home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / amiga / Narrator.mod < prev    next >
Text File  |  1995-06-29  |  7KB  |  150 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: Narrator.mod $
  4.   Description: Interface to V37 narrator.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.7 $
  8.       $Author: fjc $
  9.         $Date: 1995/06/04 23:13:14 $
  10.  
  11.   $VER: narrator.h 1.7 (12.3.91)
  12.   Includes Release 40.15
  13.  
  14.   Copyright 1990, 1991 Joseph Katz/Mark Barton.
  15.   All rights reserved.
  16.  
  17.   This include file (narrator.h) may be freely distributed
  18.   as long as the above copyright notice remains intact.
  19.  
  20.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  21.   This file is part of the Oberon-A Interface.
  22.   See Oberon-A.doc for conditions of use and distribution.
  23.  
  24. ***************************************************************************)
  25.  
  26. <* STANDARD- *>
  27.  
  28. MODULE [2] Narrator;
  29.  
  30. IMPORT e := Exec, s := Sets;
  31.  
  32. CONST
  33.                 (*          Device Options      *)
  34.  
  35.   newIORB     * = 0;       (* Use new extended IORB                *)
  36.   wordSync    * = 1;       (* Generate word sync messages          *)
  37.   sylSync     * = 2;       (* Generate syllable sync messages      *)
  38.  
  39.  
  40.                 (*          Error Codes         *)
  41.  
  42.   noMem        * = -2;      (* Can't allocate memory                *)
  43.   noAudLib     * = -3;      (* Can't open audio device              *)
  44.   makeBad      * = -4;      (* Error in MakeLibrary call            *)
  45.   unitErr      * = -5;      (* Unit other than 0                    *)
  46.   cantAlloc    * = -6;      (* Can't allocate audio channel(s)      *)
  47.   unimpl       * = -7;      (* Unimplemented command                *)
  48.   noWrite      * = -8;      (* Read for mouth without write first   *)
  49.   expunged     * = -9;      (* Can't open, deferred expunge bit set *)
  50.   phonErr     * = -20;      (* Phoneme code spelling error                  *)
  51.   rateErr     * = -21;      (* Rate out of bounds                   *)
  52.   pitchErr    * = -22;      (* Pitch out of bounds                          *)
  53.   sexErr      * = -23;      (* Sex not valid                        *)
  54.   modeErr     * = -24;      (* Mode not valid                       *)
  55.   freqErr     * = -25;      (* Sampling frequency out of bounds     *)
  56.   volErr      * = -26;      (* Volume out of bounds         *)
  57.   dCentErr    * = -27;      (* Degree of centralization out of bounds *)
  58.   centPhonErr * = -28;      (* Invalid central phon                 *)
  59.  
  60.  
  61.  
  62.                 (* Input parameters and defaults *)
  63.  
  64.   defPitch    * = 110;         (* Default pitch                        *)
  65.   defRate     * = 150;         (* Default speaking rate (wpm)                  *)
  66.   defVol      * = 64;          (* Default volume (full)                *)
  67.   defFreq     * = 22200;       (* Default sampling frequency (Hz)      *)
  68.   male        * = 0;           (* Male vocal tract                     *)
  69.   female      * = 1;           (* Female vocal tract                   *)
  70.   naturalF0   * = 0;           (* Natural pitch contours               *)
  71.   roboticF0   * = 1;           (* Monotone pitch                       *)
  72.   manualF0    * = 2;           (* Manual setting of pitch contours     *)
  73.   defSex      * = male;        (* Default sex                                  *)
  74.   defMode     * = naturalF0;   (* Default mode                 *)
  75.   defArtic    * = 100;         (* 100% articulation (normal)           *)
  76.   defCentral  * = 0;           (* No centralization                    *)
  77.   defF0Pert   * = 0;           (* No F0 Perturbation                   *)
  78.   defF0Enthus * = 32;          (* Default F0 enthusiasm (in 32nds)     *)
  79.   defPriority * = 100;         (* Default speaking priority            *)
  80.  
  81.  
  82.                         (*      Parameter bounds        *)
  83.  
  84.   minRate     * = 40;          (* Minimum speaking rate                *)
  85.   maxRate     * = 400;         (* Maximum speaking rate                *)
  86.   minPitch    * = 65;          (* Minimum pitch                        *)
  87.   maxPitch    * = 320;         (* Maximum pitch                        *)
  88.   minFreq     * = 5000;        (* Minimum sampling frequency           *)
  89.   maxFreq     * = 28000;       (* Maximum sampling frequency           *)
  90.   minVol      * = 0;           (* Minimum volume                       *)
  91.   maxVol      * = 64;          (* Maximum volume                       *)
  92.   minCent     * = 0;           (* Minimum degree of centralization     *)
  93.   maxCent     * = 100;         (* Maximum degree of centralization     *)
  94.  
  95.  
  96. TYPE
  97.  
  98.                 (*    Standard Write request    *)
  99.  
  100.   NarratorBase *= RECORD (e.IORequestBase) END;
  101.   NarratorBasePtr *= POINTER TO NarratorBase;
  102.  
  103.   NarratorPtr * = POINTER TO Narrator;
  104.   Narrator * = RECORD (NarratorBase)
  105.     message *      : e.IOStdReq;   (* Standard IORB                *)
  106.     rate *         : e.UWORD;      (* Speaking rate (words/minute) *)
  107.     pitch *        : e.UWORD;      (* Baseline pitch in Hertz      *)
  108.     mode *         : e.UWORD;      (* Pitch mode                   *)
  109.     sex *          : e.UWORD;      (* Sex of voice                 *)
  110.     chMasks *      : e.APTR;       (* Pointer to audio alloc maps  *)
  111.     nmMasks *      : e.UWORD;      (* Number of audio alloc maps   *)
  112.     volume *       : e.UWORD;      (* Volume. 0 (off) thru 64      *)
  113.     sampfreq *     : e.UWORD;      (* Audio sampling freq          *)
  114.     mouths *       : BOOLEAN;      (* If non-zero, generate mouths *)
  115.     chanmask *     : e.UBYTE;      (* Which ch mask used (internal)*)
  116.     numchan *      : e.UBYTE;      (* Num ch masks used (internal) *)
  117.     flags *        : s.SET8;       (* New feature flags            *)
  118.     f0enthusiasm * : SHORTINT;      (* F0 excursion factor          *)
  119.     f0perturb *    : SHORTINT;      (* Amount of F0 perturbation    *)
  120.     f1adj *        : SHORTINT;     (* F1 adjustment in ±5% steps   *)
  121.     f2adj *        : SHORTINT;     (* F2 adjustment in ±5% steps   *)
  122.     f3adj *        : SHORTINT;     (* F3 adjustment in ±5% steps   *)
  123.     a1adj *        : SHORTINT;     (* A1 adjustment in decibels    *)
  124.     a2adj *        : SHORTINT;     (* A2 adjustment in decibels    *)
  125.     a3adj *        : SHORTINT;     (* A3 adjustment in decibels    *)
  126.     articulate *   : SHORTINT;      (* Transition time multiplier   *)
  127.     centralize *   : SHORTINT;      (* Degree of vowel centralization *)
  128.     centphon *     : e.APTR;       (* Pointer to central ASCII phon  *)
  129.     avbias *       : SHORTINT;     (* AV bias                      *)
  130.     afbias *       : SHORTINT;     (* AF bias                      *)
  131.     priority *     : SHORTINT;     (* Priority while speaking      *)
  132.     pad1 *         : SHORTINT;     (* For alignment                *)
  133.   END; (* Narrator *)
  134.  
  135.  
  136.  
  137.                 (*    Standard Read request     *)
  138.  
  139.   MouthPtr * = POINTER TO Mouth;
  140.   Mouth * = RECORD (NarratorBase)
  141.     voice *  : Narrator;        (* Speech IORB                  *)
  142.     width *  : e.UBYTE;         (* Width (returned value)       *)
  143.     height * : e.UBYTE;         (* Height (returned value)      *)
  144.     shape -  : e.UBYTE;         (* Internal use, do not modify  *)
  145.     sync *   : e.UBYTE;         (* Returned sync events         *)
  146.   END; (* Mouth *)
  147.  
  148. END Narrator.
  149.  
  150.